Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ENV variable to flag build with CUDA (instead of only "torch.cuda… #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brandonfranzke
Copy link

I want to run the build scripts from within a docker container. I use nvidia-docker but the nvidia devices are not available during build by design. All the cuda libraries are available though.

Add an env flag "BUILD_WITH_CUDA" to force building with CUDA even if torch.cuda.is_available() returns False (such as during "docker build).

@ruotianluo
Copy link
Owner

Why Build it during docker build? Can't you build it when you log into the docker.

@brandonfranzke
Copy link
Author

brandonfranzke commented Sep 21, 2017

This is part of an automated deployment workflow for an image segmenting webapp. The workflow builds the image on non-GPU instances. I do not have shell access to the containers after they are built. Once the build completes the orchestrator deploys the container to GPU servers.

Here is an issue reported to the nvidia-docker project with a bit more describing that the nvidia devices and volumes are not available during building though all libraries and files are:

NVIDIA/nvidia-docker#225

I can also modify the request to use parsed args if that would be better. This env method is quick and dirty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants